public class SxtStu {
        int id;
        String sname;
        int age;
        Computer c;
        SxtStu(int id, String sname, int age) {
            this.id = id;
            this.sname = sname;
            this.age = age;
        }
        void study() {
            System.out.println("我正在学习! 使用我们的电脑，姓名:" + sname + "，电脑配置: " + c);
        }
        public static void main(String[] args) {
            Computer comp1 = new Computer("联想", 4);
            Computer comp2 = new Computer("戴尔", 3);
            Computer comp3 = new Computer("苹果", 3);
            SxtStu s1 = new SxtStu(1, "张三", 20);
            SxtStu s2 = new SxtStu(2, "李四", 21);
            SxtStu s3 = new SxtStu(3, "王五", 22);
            s1.c = comp1;
            s2.c = comp2;
            s3.c = comp3;
            s1.study();
            s2.study();
            s3.study();
        }
    }
